#include"mytext.h"
char section[Sec_num][20];
int ReadSection(char *FileAddress)
{
	int num = 0, i = 0, j = 0;
	char AllSection[Allsec_size];
	memset(AllSection, 0, sizeof(AllSection));
	GetPrivateProfileSectionNamesA(AllSection, Allsec_size, FileAddress);
	if (AllSection[0] == '\0')
		return 0;
	for (i = 0, j = 0; i < Allsec_size; i++)
	{
		section[num][j++] = AllSection[i];
		if (AllSection[i] == '\0'&&AllSection[i + 1] != '\0')
		{
			j = 0;
			num++;
		}
		else if (AllSection[i] == '\0'&&AllSection[i + 1] == '\0')
		{
			return ++num;
		}
	}
}